//
//  UIViewController+Navigation.h
//
//  Created by Jiaozl on 9/30/16.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, ZLViewControllerOpenType) {
    ZLViewControllerOpenTypePush,
    ZLViewControllerOpenTypePresent
};

@interface ZLViewControllerOpenItem : NSObject
@property (nonatomic, strong, readonly) id vc;
@property (nonatomic, assign, readonly) ZLViewControllerOpenType type;
@property (nonatomic, assign, readonly) UIModalPresentationStyle presentStyle;

@end

typedef void (^OpenVCCompletionHandler)(ZLViewControllerOpenItem *model);

@interface UIViewController (Navigation)

+ (void)pushViewController:(UIViewController *)vc animated:(BOOL)animated;
+ (void)presentViewController:(UIViewController *)vc animated:(BOOL)animated;
+ (void)presentViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))completion;

+ (void)notFullScreenPresentViewController:(UIViewController *)vc animated:(BOOL)animated;

+ (void)notFullScreenPresentViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))completion;

/// 自动判断Push/Present
+ (void)openViewController:(UIViewController *)vc animated:(BOOL)animated;
/// 自动判断Push/Present present的时候，会有completion,push不会有效果
+ (void)openViewController:(UIViewController *)vc animated:(BOOL)animated completion:(OpenVCCompletionHandler)completion;
+ (void)notFullScreenOpenViewController:(UIViewController *)vc animated:(BOOL)animated;

+ (UIViewController *)currentViewController;

@end
